﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ThinkDotNetEditorLib.Controllers;

namespace ThinkDotNetEditorLib.Views
{
    public class ArenaView : Panel,IArenaView
    {
        private readonly ArenaController _arenaController;     

        public ArenaView()
        {
            _arenaController = new ArenaController(ServiceLocator.Instance.Resolve<IStaticObjectController>(), this);
        }        
        #region Properties             

        #endregion

        #region Events        

        #endregion

        #region IArenaView members

        private IShellForm _shellForm;

        public IShellForm Shell
        {
            get
            {
                if (_shellForm == null)
                {
                    Control parent = Parent;
                    while (!(parent is IShellForm))
                        parent = parent.Parent;

                    _shellForm = (IShellForm) parent;
                }
                return _shellForm;
            }
        }

        #endregion        
    }
}
